package com.createidea.cms.struts.action;

import java.util.Locale;

import org.apache.struts.chain.contexts.ActionContext;

public class IndexAction extends BaseAction {
	private String language;
	
	public String index(){
		
		return SUCCESS;
		
	}
	
	public String changeLanguage(){
		Locale locale = null;
	    if(language.equals("CN"))
	     locale = Locale.CHINA;
	    if(language.equals("EN"))
	     locale = Locale.ENGLISH;
	
	    this.getSession().setAttribute("WW_TRANS_I18N_LOCALE",locale);
		return SUCCESS;
	}

	public String getLanguage() {
		return language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}
    
	
}
